<?php

class MidAutumnGetPointRewardAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * 中秋节排行榜领奖
     * @param $userId
     * @param $activityId
     * @param $step
     * @param $reqTime
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId, $activityId, $step, $reqTime)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_MID_AUTUMN_FUNC)) {
            return $this->buildResponse(false);
        }

        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(
            MidAutumnService::get()->midAutumnPointGetReward($userId, $activityId, $step, $reqTime)
        );
    }
}